window.Model = function({resourceName}){
  return {
    init: function(){
      var APP_ID = 'D2k4giz5tqcifHlTKGAAIi1m-MdYXbMMI';
      var APP_KEY = 'VfAwVmvRgSd4IgvND6SYrMGL';
      AV.init({
        appId: APP_ID,
        appKey: APP_KEY
      });
    },
    save: function(object){
      let Instance = AV.Object.extend(resourceName);
      let instance = new Instance();
      return instance.save(object)
    },
    fetch: function(){
      let query = new AV.Query(resourceName);
      return query.find()
    }

  }
};